﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace QLSV
{
    class DAL_Sinhvien
    {
        public DAL_Sinhvien()
        {}
        public void  InsertSinhvien (int masv, string tensv,string malop, string diachi)
             {
                SqlConnection conn = new SqlConnection();
                conn.ConnectionString="Data source=(local);Initial Catalog=qlsv; User Id=sa; Password=sa";                 
                conn.Open();
                SqlCommand cmd = new SqlCommand("insert into sinhvien values (" +masv.ToString()+",'" +tensv+ "','" +malop+ "','" +diachi+ "')" , conn);
                cmd.ExecuteNonQuery(); 
                conn.Close();
            }
        }
    }
